#include <stdio.h>
#include <stdlib.h>
#include "linklist.h"
int main(void)
{
    linklist head = linklist_init();
    int n;
    scanf("%d", &n);
    for (int i = 1; i <=n; i++)
    {
        linklist new = linklist_new(i);
        head=linkllist_add(head, new);
    }
    linklist_for_each(head);
    head=Josephus(head);
    linklist_for_each(head);
    return 0;
}
